//
//  LXFeedbackViewController.m
//  LvXi_newVersion
//
//  Created by 诸葛孔明 on 16/9/6.
//  Copyright © 2016年 SJT. All rights reserved.
//............................................................................................//
//...........................................个人中心-意见反馈...........................................//
//............................................................................................//

#import "LXFeedbackViewController.h"
#import "LXTextView.h"

@interface LXFeedbackViewController ()

//意见文字
@property (nonatomic,weak) LXTextView *wordTextView;
//联系方式文字
@property (nonatomic,weak) UILabel *eMailLabel;
//手机号码
@property (nonatomic,weak) UITextField *phoneField;
//提交按钮
@property (nonatomic,weak) UIButton *commitButton;

@end

@implementation LXFeedbackViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor colorWithRed:238 / 255.0 green:238 / 255.0 blue:238 / 255.0 alpha:1.0];

    [self setUpSubViews];
}

#pragma mark - 设置导航条
- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [self setUpNavi];
}
-(void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
}

-(void)setUpNavi{
    [super setUpNavi];
    self.navigationItem.title = @"意见反馈";
}
#pragma mark - 设置子控件
- (void)setUpSubViews
{
    LXTextView *wordTextView = [[LXTextView alloc] init];
    wordTextView.backgroundColor = [UIColor whiteColor];
    wordTextView.frame = CGRectMake(10, 74, ScreenWidth - 20, 150);
//    wordTextView.layer.cornerRadius = 5;
    wordTextView.placeholder = @"感谢您关注绿稀全球购商城,希望您多提意见和建议。您的反馈将帮助我们更快的成长。";
    wordTextView.font = [UIFont systemFontOfSize:15];
    [wordTextView setPlaceHolderColor:HexColor(@"#999999")];
    wordTextView.textCountLabel.hidden = YES;
    [self.view addSubview:wordTextView];
    self.wordTextView = wordTextView;
    
    UILabel *eMailLabel = [[UILabel alloc] init];
    eMailLabel.backgroundColor = [UIColor whiteColor];
    eMailLabel.text = @"联系方式:";
    eMailLabel.textAlignment = NSTextAlignmentCenter;
    eMailLabel.font = [UIFont systemFontOfSize:14];
    eMailLabel.textColor = HexColor(@"#333333");
    eMailLabel.frame = CGRectMake(10, self.wordTextView.botton, 70, 45);
    [self.view addSubview:eMailLabel];
    self.eMailLabel = eMailLabel;
    
    UITextField *phoneField = [[UITextField alloc] init];
    phoneField.placeholder = @"手机号/邮箱号";
    phoneField.frame = CGRectMake(self.eMailLabel.right, self.eMailLabel.y, self.wordTextView.width - self.eMailLabel.width, self.eMailLabel.height);
    phoneField.backgroundColor = [UIColor whiteColor];
    phoneField.font = [UIFont systemFontOfSize:14];
    [self.view addSubview:phoneField];
    self.phoneField = phoneField;
    
    UIButton *commitButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [commitButton addTarget:self action:@selector(commitBtnClick) forControlEvents:UIControlEventTouchUpInside];
    [commitButton setTitle:@"提交" forState:UIControlStateNormal];
    [commitButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [commitButton setBackgroundColor:LXMainColor];
    commitButton.frame = CGRectMake(self.wordTextView.x, self.eMailLabel.botton + 35, self.wordTextView.width, 40);
    commitButton.layer.cornerRadius = 5;
    [self.view addSubview:commitButton];
    self.commitButton = commitButton;
}

#pragma mark - 事件处理
- (void)commitBtnClick
{

}

@end
